package com.cyq.blog.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.cyq.blog.entity.Blog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface BlogMapper extends BaseMapper<Blog> {
    /**
     * 自定义查询SQL
     * @param queryWrapper
     * @return
     */
    @Select("select count(*) from blog ${ew.customSqlSegment}")
    int countBlog(@Param(Constants.WRAPPER) Wrapper<Blog> queryWrapper);
}
